home *** CD-ROM | disk | FTP | other *** search
- /*
- * MultiMAIL offline mail reader
- *
-
- Written by Kolossvary Tamas (thomas@vma.bme.hu)
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
- #include "interface.h"
-
- extern mmail mm;
- extern AreaListWindow areas;
-
-
- HelpWindow :: HelpWindow(void)
- {
- active = 0;
- }
-
- void HelpWindow :: redraw(void)
- {
- if(active)
- {
- touchwin(menu);
- wnoutrefresh(menu);
- }
- }
-
- void HelpWindow :: packetlist(void)
- {
- menu=newwin(3, COLS-4, LINES-4, 2);
- init_pair(4, COLOR_YELLOW, COLOR_BLACK);
- init_pair(5, COLOR_WHITE, COLOR_BLACK);
- wattrset(menu, COLOR_PAIR(4) | A_BOLD);
- mvwaddstr(menu, 0, 0, "Q");
- mvwaddstr(menu, 0, 20,"Enter");
- mvwaddstr(menu, 0, 45,"A");
- wattrset(menu, COLOR_PAIR(5) | A_BOLD);
- mvwaddstr(menu, 0, 1, ": Quit");
- mvwaddstr(menu, 0, 25, ": Select packet");
- mvwaddstr(menu, 0, 46, ": Addressbook");
-
- wnoutrefresh(menu);
- active = 1;
- }
-
- void HelpWindow :: arealist(void)
- {
- menu=newwin(3, COLS-4, LINES-4, 2);
- init_pair(4, COLOR_YELLOW, COLOR_BLACK);
- init_pair(5, COLOR_WHITE, COLOR_BLACK);
- wattrset(menu, COLOR_PAIR(4) | A_BOLD);
- mvwaddch(menu, 0, 0, 'Q');
- mvwaddstr(menu, 0, 29, "Enter");
- mvwaddch(menu, 0, 57, 'A');
- mvwaddch(menu, 1, 0, 'E');
-
- mm.areaList->gotoArea(REPLY_AREA);
- if(mm.areaList->getNoOfLetters() > 0)
- mvwaddstr(menu, 1, 32, "F2");
-
- wattrset(menu, COLOR_PAIR(5) | A_BOLD);
- mvwaddstr(menu, 0, 1, ": Go to Packet Selection");
- mvwaddstr(menu, 0, 34, ": Select area");
- mvwaddstr(menu, 0, 58, ": Addressbook");
- mvwaddstr(menu, 1, 1, ": Enter letter to area");
-
- if(mm.areaList->getNoOfLetters() > 0)
- mvwaddstr(menu, 1, 34, ": Create reply packet");
- areas.Reset_areaList();
-
- wnoutrefresh(menu);
- active = 1;
- }
-
- void HelpWindow :: letterlist(void)
- {
- reply_area_letterlist();
- mvwaddstr(menu, 1, 1, ": Enter letter in area");
- wattrset(menu, COLOR_PAIR(4) | A_BOLD);
- mvwaddch(menu, 1, 0, 'E');
-
- wnoutrefresh(menu);
- active = 1;
- }
-
- void HelpWindow :: reply_area_letterlist(void)
- {
- menu=newwin(3, COLS-4, LINES-4, 2);
- wattrset(menu, COLOR_PAIR(4) | A_BOLD);
- mvwaddch(menu, 0, 0, 'Q');
- mvwaddstr(menu, 0, 26, "Enter");
- mvwaddch(menu, 0, 49, 'S');
- mvwaddch(menu, 1, 30, 'A');
- wattrset(menu, COLOR_PAIR(5) | A_BOLD);
- mvwaddstr(menu, 0, 1, ": Back to arealist");
- mvwaddstr(menu, 0, 31, ": Read letter");
- mvwaddstr(menu, 0, 50, ": Save all letters in area");
- mvwaddstr(menu, 1, 31, ": Addressbook");
-
- wnoutrefresh(menu);
- active = 1;
- }
-
- void HelpWindow :: letter(void)
- {
- int i;
-
- init_pair(61, COLOR_WHITE, COLOR_BLUE);
- init_pair(62, COLOR_YELLOW, COLOR_BLUE);
- menu=newwin(12, 60, 8, 10);
- wattrset(menu, COLOR_PAIR(61) | A_BOLD);
- for(i=0; i<(12*60); i++)
- waddch(menu, ' ');
- wborder(menu, 0, 0, 0, 0, 0, 0, 0, 0);
- wattrset(menu, COLOR_PAIR(62) | A_BOLD);
- mvwaddstr(menu, 1, 2, "S - save letter");
- mvwaddstr(menu, 2, 2, "R - reply to letter");
- mvwaddstr(menu, 3, 2, "O - reply to original sender");
- mvwaddstr(menu, 4, 2, "E - enter letter");
- mvwaddstr(menu, 5, 2, "N - netmail reply");
- mvwaddstr(menu, 7, 2, "A - addressbook");
-
- wnoutrefresh(menu);
- active = 1;
- }
-
- void HelpWindow :: reply_area_letter(void)
- {
- int i;
-
- init_pair(61, COLOR_WHITE, COLOR_BLUE);
- init_pair(62, COLOR_YELLOW, COLOR_BLUE);
- menu=newwin(12, 60, 8, 10);
- wattrset(menu, COLOR_PAIR(61) | A_BOLD);
- for(i=0; i<(12*60); i++)
- waddch(menu, ' ');
- wborder(menu, 0, 0, 0, 0, 0, 0, 0, 0);
- wattrset(menu, COLOR_PAIR(62) | A_BOLD);
- mvwaddstr(menu, 1, 2, "K - kill letter");
- mvwaddstr(menu, 3, 2, "A - addressbook");
- wnoutrefresh(menu);
- active = 1;
- }
-
- void HelpWindow :: Delete(void)
- {
- delwin(menu);
- active = 0;
- }
-